<template>
  <!-- <el-aside width="200px">Aside</el-aside> -->
  <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
    <el-menu text-color="black" default-active="/home/welcome" :router="true" active-text-color="#409eff">
      <!-- 一级菜单 -->
      <el-submenu :index="item.menuName" v-for="(item,i) in this.$store.state.navbar" :key="i">
        <template slot="title">
          <i :class="item.menuIcon"></i>
          <span>{{item.menuName}}</span>
        </template>
        <!-- 二级菜单 -->
        <!-- <div v-if="item.children"> -->
          <el-menu-item v-for="(nav,j) in item.children" :key="j" :index="nav.menuUrl">
            <template slot="title">
              <i :class="nav.menuIcon"></i>
              <span>{{nav.menuName}}</span>
            </template>
          </el-menu-item>
        <!-- </div> -->
      </el-submenu>
    </el-menu>
  </el-aside>
</template>
<script>
export default {
  components: {},
  data() {
    return {
    };
  },
  methods: {
  },
  created() {
     this.$store.dispatch('findAllMenu')
  },
};
</script>
<style lang='less' scoped>
</style>